import type { MenuVO } from "@/server/menu/types";
import StoreManager from "./storage";

const Auth = {
  check(menuCode: string): boolean {
    const permissions = StoreManager.get<MenuVO[]>("menuAuth"); // localStorage.getItem("menuAuth")
    return permissions.some((permission: MenuVO) => permission.menuCode === menuCode);
  }
}
export default Auth;
